<?php

require_once dirname(__FILE__).'/../lib/locationGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/locationGeneratorHelper.class.php';

/**
 * location actions.
 *
 * @package    sf_sandbox
 * @subpackage location
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class locationActions extends autoLocationActions
{
	public function executeGetBySectorIds(){
		$sector_ids = $this->getRequestParameter('sector_ids');
		$sector_ids = trim($sector_ids,'-');
		$sector_ids = explode('-',$sector_ids);
		
		$location_options = LocationsInSectorTable::getInstance()->getTreeBySectorIds($sector_ids);
		
		return $this->renderText(json_encode($location_options));
	}
}
